<!DOCTYPE html>
<html>
<head>
    <title>门诊信息</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <meta name="description" content="">

    <link rel="stylesheet" href="/lib/weui.min.css">
    <link rel="stylesheet" href="/css/jquery-weui.css">
    <link rel="stylesheet" href="/css/home.css">
    <link rel="stylesheet" href="/plugins/fontaw/css/font-awesome.css">
<style>
    .border--btm-1px{ border-bottom: 1px solid rgba(0,0,0,.1);margin:0.4rem 0rem}
    .clinic-info{padding:0.5rem;font-size:0.7rem;}
    .clinic-info p{color:grey}
    .day-table{background:#7c7c7c;margin-top:0.4rem}
    .day-table th{color:white;background-color:rgba(149,153,175,.8)}
    .day-table td{background:white}
    .flex-1{flex: 1;display: inline-block;vertical-align: -webkit-baseline-middle;margin-right: 0.2rem}
    .flex-1 img{border-radius: 50%}
    .top-head{padding:0.5rem;color: grey}
    .fright{float: right;}
    .topbtn{
        color: #fff;
        line-height: 2.55555556;
        border-radius: 5px;
        padding-left: 14px;
        padding-right: 14px;
        display: block;
        margin-left: auto;
    }
    .banner-info{
        padding:0.5rem;
        margin-top: 0.3rem;
    }
</style>
</head>
<body>
<div class="weui-flex">
    <div class="weui-flex__item top-head" >
        <div class="flex-1"><img src="/mod-page/images/avatar-icon.png" width="45"></div>
        <span class="flex-1">kriss</span>
        <span class="flex-1" style="color: lightgrey">医师</span>

        <span class="flex-1  fright">
             <a class="topbtn weui-btn_primary" href="javascript:"  href="javascript:;" onclick="toAdd()"> 添 加  </a>
        </span>
    </div>
</div>

<div class="weui-flex">
    <div class="weui-flex__item">
        <div class="weui-panel__ft">
            <span class="banner-info">门诊信息</span>
        </div>
        <div class="border--btm-1px"></div>
        <div id="clinics">

        </div>

    </div>

</div>

<script src="/lib/jquery-2.1.4.js"></script>
<script src="/lib/fastclick.js"></script>
<script src="/js/home.js"></script>
<script src="/js/jquery-weui.js"></script>
<script>
    var doctorId = getQueryString("doctorId");
    $(document).ready(function(){
        loadDoctorClinics();
        loadDoctor()
    });
    function loadDoctor(){
        $.ajax({
            url:"/clinic/getDoctorInfo",
            data:{"doctorId":doctorId},
            success:function(da){
                if($.trim(da)==""){
                    $.toast("医师暂未设置门诊信息","text");
                }else{
                    $("#clinics").html(da);
                    $(".day-table td").each(function(){
                        if($(this).text()!=""){
                            $(this).css({"background-color":"rgba(233,233,231,.8)","color":"#b84a62"});
                        }
                    });
                }

            }
        });
    }
   function  loadDoctorClinics(){
       $.ajax({
           url:"/clinic/loadDoctorClinics",
           data:{"doctorId":doctorId},
           success:function(da){
               if($.trim(da)==""){
                   $.toast("医师暂未设置门诊信息","text");
               }else{
                   $("#clinics").html(da);
                   $(".day-table td").each(function(){
                       if($(this).text()!=""){
                           $(this).css({"background-color":"rgba(233,233,231,.8)","color":"#b84a62"});
                       }
                   });
               }
           }
       });
   }
   function toAdd(){
        location.href="/mod-page/studio/list_clinic_edit.html?doctorId="+doctorId;
   }
</script>
</body>
</html>